-
-
Notifications
You must be signed in to change notification settings - Fork 32k
bpo-43698: do not use ...
as argument name in docs
#30502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
def visit_a(self, ...): | ||
... | ||
... | ||
class MyVisitor: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is special. There was no class
context defined. I've added it as well.
Co-authored-by: Alex Waygood <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -186,15 +186,15 @@ The :mod:`abc` module also provides the following decorator: | |||
|
|||
class C(ABC): | |||
@abstractmethod | |||
def my_abstract_method(self, ...): | |||
def my_abstract_method(self, arg1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def my_abstract_method(self, arg1): | |
def my_abstract_method(self, arg): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've used explicitly different names to highlight that they are different.
GH-30917 is a backport of this pull request to the 3.10 branch. |
(cherry picked from commit b9d8980) Co-authored-by: Nikita Sobolev <[email protected]>
GH-30918 is a backport of this pull request to the 3.9 branch. |
(cherry picked from commit b9d8980) Co-authored-by: Nikita Sobolev <[email protected]>
(cherry picked from commit b9d8980) Co-authored-by: Nikita Sobolev <[email protected]>
(cherry picked from commit b9d8980) Co-authored-by: Nikita Sobolev <[email protected]>
(cherry picked from commit b9d8980) Co-authored-by: Nikita Sobolev <[email protected]>
Some people might think that
...
is allowed as an argument name (or might think that it is some kind of special syntax like*
or/
). I believe that using valid syntax in our examples is better.So, now all examples with
...
are refactored to use regular names. Now it will be easier to copy-paste examples for our users.https://bugs.python.org/issue43698
CC @corona10 as my mentor.